import tool from '@/utils/tool.js' 
import request from '@/utils/http.js'
export default {
	
selectAll(data) {
	  return request({
	    url: '/post/selectpost',
	    method: 'GET',
	    data: data,
		showLoading: true,
	  })
	},
	myselectall(data) {
		  return request({
		    url: '/post/selectmyself',
		    method: 'GET',
		    data: data,
			showLoading: true,
		  })
		},
		selectone(data) {
			  return request({
			    url: '/post/selectone',
			    method: 'GET',
			    data: data,
				showLoading: true,
			  })
			},
			deletePost(id) {
				console.log('删除文章ID:', id);
				return request({
				  url: '/post/deleteById',
				  method: 'DELETE',
				  params: { id },  // 使用params来传递查询参数
				  showLoading: false  // 因为外层已经有loading了
				})
}
}